/*
-----------------------------------------------------------------------------
This source file is part of DIVA
The project of Engineering Lab, dept. of CSIE, NTNU.

Copyright (c) 2000-2006 The Engineering Lab, dept. of CSIE, NTNU.
-----------------------------------------------------------------------------
Filename:    DIVA_AbstractVM.h
date:		2007/07/04
Description: 
	A completed VM should contains 2 parts.One(DIVA_AbstractVM) is VM interface,another(OgreVM) is VM animation(or 3D effect)

	In DIVA_AbstractVM.h,we account what interface a VM should implements.

    we defined several basic abstract actions that all VMs should implement,like:pick,select,drag....


-----------------------------------------------------------------------------
*/

#include "Ogre.h"
/*------------------------------------------------------------*/
#ifndef _DIVA_ABSTRACTVM_H_
#define	_DIVA_ABSTRACTVM_H_
/*------------------------------------------------------------*/

class DIVA_AbstractVM{
public:
	~DIVA_AbstractVM();
	//a decorous VM should extends and implements these methods

	virtual void VMValueUpdated(){};
	virtual void VMAnimation(const Ogre::FrameEvent& evt){};

	virtual void VMPicked(float x,float y,float z){};
	virtual void VMExpand(){};  //ad added at 98/2/14
	virtual void VMSelected(float x,float y,float z){};
	virtual void VMDragged(float scx, float scy, float absx,float absy,float absz){};
	virtual void enableVMAnimation() { _animationon = true ; }
	virtual void disableVMAnimation() { _animationon = false ; }
	virtual bool isVMAnimationOn() { return _animationon  ; } 

	virtual void enableVMDragged() { _dragged = true ; }
	virtual void disableVMDraggeed() { _dragged = false ; }
	virtual bool isDraggedOn() {return _dragged ; }

	virtual std::string getVMType() = 0 ;
	//virtual void VMReleased(Real x,Real y,Real z);
	//virtual void VMMoved(Real x,Real y,Real z);
	//virtual void VMEntered(Real x,Real y,Real z);
	//virtual void VMExited(Real x,Real y,Real z);
	//virtual void VMDragEntered(Real x,Real y,Real z);
	//virtual void VMDragExited(Real x,Real y,Real z);
	//virtual void VMDragMoved(Real x,Real y,Real z);
protected:
	
	DIVA_AbstractVM() { _animationon = false ; _dragged = true ; }
	bool _animationon ;
	bool _dragged ;
	


};
/*------------------------------------------------------------*/
#endif	//#ifndef _DIVA_ABSTRACT_VM_H_
/*------------------------------------------------------------*/